<template>
  <el-button v-bind="$attrs" v-on="$listeners" v-if="has">
    <slot />
  </el-button>
</template>

<script>
export default {
  name: "PermissionButton",
  props: ['permission'],
  computed: {
    has () {
      console.log(this.$store)
      return this.$store.getters.buttons.includes(this.permission)
    }
  }
};
</script>